//
//  OrderTabCell.m
//  RentTable
//
//  Created by mac on 2024/11/30.
//

#import "OrderTabCell.h"
#import "ReviewOrderView.h"

//审核卡片
@interface OrderTabCell()

@property (nonatomic, strong) UIImageView *iconImageView;
@property (nonatomic, strong) UILabel *titleLabel;

@property (nonatomic,strong) ReviewOrderView *orderView;

@end

@implementation OrderTabCell


- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        
        [self setupUI];
    }
    return self;
}

- (void)setRentModel:(RentModel *)rentModel {
    _rentModel = rentModel;
    self.orderView.is_order = true;
    self.orderView.rentModel = rentModel;
}

- (void)setupUI {
    self.iconImageView = [[UIImageView alloc] init];
    self.iconImageView.image = [UIImage imageNamed:@"审核卡片"];
    [self addSubview:self.iconImageView];
    [self.iconImageView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.leading.trailing.mas_equalTo(0);
        make.bottom.mas_equalTo(-10);
    }];
    
    self.titleLabel = [[UILabel alloc] init];
    self.titleLabel.text = @"正在审核中...";
    self.titleLabel.font = [UIFont pingFangSCRegularWithSize:15];
    self.titleLabel.textColor = myRGBHex(0xFFFFFF);
    [self.iconImageView addSubview:self.titleLabel];
    [self.titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(10);
        make.leading.mas_equalTo(16);
        make.height.mas_equalTo(19);
    }];
    
    self.orderView = [ReviewOrderView new];
    [self.iconImageView addSubview:self.orderView];
    [self.orderView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(40);
        make.leading.trailing.mas_equalTo(0);
        make.height.mas_equalTo(120);
    }];
}

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
